import React, {Component} from 'react';
import WithHoc from "../../../hoc/WithHoc";

class Detail extends Component {
    render() {
        const {params, searchParams} = this.props.hoc;
        console.log('searchParams', Object.fromEntries(searchParams))
        return (
            <div>
                <h1>Fruit Detail</h1>
                <h3>id: {params.id}</h3>
                <h3>name: {searchParams.get('name')}</h3>
            </div>
        );
    }
}

export default WithHoc(Detail);